Before you start reading: this post is only intended to test a
plugin that I've just written to give
PyBlosxom a
txt2tags formatting support. The original txt2tag sample used here is available at
txt2tag website. Mine with few changes is
here.IntroductionWelcome to the txt2tags sample file.Here you have examples and a brief explanation of allmarks.The first 3 lines of the this file are used as headers,on the following format:
line1: document title line2: author name, email line3: date, version
Lines with balanced equal signs = around are titles.Fonts and BeautifiersWe have two sets of fonts:The NORMAL type that can be improved with beautifiers.The TYPEWRITER type that uses monospaced font forpre-formatted text.We will now enter on a subtitle...BeautifiersThe text marks for beautifiers are simple, just as youtype on a plain text email message.We use double *, /, - and _ to represent bold,italic,
strike and
underline.The bold italic style is also supported as acombination.Pre-Formatted TextWe can put a code sample or other pre-formatted text:
here is pre-formatted //marks// are **not** interpreted
And also, it's easy to put a one line pre-formattedtext:
prompt$ ls /etc
Or use
pre-formatted
inside sentences.More CosmeticsSpecial entities like email (
duh@somewhere.com) and URL (
http://www.duh.com)are detected automagically, as long as the horizontal line:
^ thin or large v
You can also specify an
explicit link with label.And remember,
A TAB in front of the line does a quotation. More TABs, more depth (if allowed).
Nice.ListsA list of items is natural, just putting a dash ora plus at the beginning of the line.Plain ListThe dash is the default list identifier. For sublists,just add spaces at the beginning of the line. Morespaces, more sublists.
The list ends with two consecutive blank lines.Numbered ListThe same rules as the plain list, just a differentidentifier (plus).
- one
- two
- three
- mixed lists!
- what a mess
- counting again
- ...
- four
Definition ListThe definition list identifier is a colon, followed bythe term. The term contents is placed on the next line.
- orange
- a yellow fruit
- apple
- a green or red fruit
- other fruits
-
- wee!
- mixing lists
- again!
- and again!
TablesUse pipes to compose table rows and cells.Double pipe at the line beginning starts a heading row.Natural spaces specify each cell alignment.
heading 1 | heading 2 | heading 3 |
---|
cell 1.1 | cell 1.2 | cell 1.3 |
cell 2.1 | cell 2.2 | cell 2.3 |
Without the last pipe, no border:
heading 1 | heading 2 | heading 3 |
---|
cell 1.1 | cell 1.2 | cell 1.3 |
cell 2.1 | cell 2.2 | cell 2.3 |
Special EntitiesBecause things were too simple.ImagesThe image mark is as simple as it can be:
[filename]
.
- The filename must end in PNG, JPG, GIF, or similar.
- No spaces inside the brackets!
OtherThe handy
%%date
macro expands to the current date.So today is 20110206 on the ISO
YYYYMMDD
format.You can also specify the date format with the %? flags,as
%%date(%m-%d-%Y)
which gives: 02-06-2011.That's all for now.